#ifndef BLURING_FX
#define BLURING_FX

float2 poisson_taps[12] = { 
	float2(-0.326212,-0.40581), float2(-0.840144,-0.07358),
	float2(-0.695914,0.457137), float2(-0.203345,0.620716),
	float2(0.96234,-0.194983), float2(0.473434,-0.480026),
	float2(0.519456,0.767022), float2(0.185461,-0.893124),
	float2(0.507431,0.064425), float2(0.89642,0.412458),
	float2(-0.32194,-0.932615), float2(-0.791559,-0.59771)
};

float4 poissonBlur(sampler tex, float2 uv, float radius, float2 texture_size)
{
	float texel_size = float2(1 / texture_size.x, 1 / texture_size.y);
	float4 color = tex2D(tex, uv);
	for(int i = 0; i < 12; ++i)
		color += tex2D(tex, uv + poisson_taps[i] * radius * texel_size);
	return color / 13;	
}

#endif
